<?
    /* -*- Mode: PHP5; tab-width: 4; indent-tabs-mode: nil; basic-offset: 4 -*- */
    
    /*********************************************************
    *            --== InArch ==--
    *
    * Ajax Get Node Info action
    *
    * @author Kulikov Alexey <a.kulikov@gmail.com>
    * @version n/a
    * @since 23.04.2005
    * @copyright essentialmind.com 2005
    *
    *********************************************************/

    /***
    * @package ajax
    * @author A Kulikov <a.kulikov@gmail.com>
    * @version n/a
    ***/
    class ajaxGetOrder extends ajaxAction{

        function process(){
            
            $order          = $this->db->getRow("SELECT * FROM node_shop_order WHERE id = ".(int)$_REQUEST['id']);
            $order['items'] = $this->db->getAll("SELECT
                                                        node_shop_article.ticket_title AS name,
                                                        node_shop_order_article.quant1,
                                                        node_shop_order_article.quant2,
                                                        node_shop_order_article.price AS price_adults,
                                                        node_shop_order_article.price_kids
                                                    FROM node_shop_order_article 
                                                    LEFT JOIN node_shop_article ON node_shop_order_article.article_id = node_shop_article.id
                                                    WHERE node_shop_order_article.order_id = ".(int)$_REQUEST['id']." ORDER BY node_shop_article.teaser_title");
            
            $this->smarty->assign('order',$order);
            $this->r->html = $this->smarty->preFetch('ajax/shopOrder.html');
        }
    }
?>